package common;

import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 * Due to RMI-oriented nature of our application, this class encapsulates
 * interface which is accessed by clients. The return classes of these methods are serializable 
 * therefore prepared to be transfered over network. 
 * Client, instead of sending a query to a server, invokes methods on the server interface object.   
 */
public interface LongcatServerInterface extends Remote {
	void registerStorage(StorageInterface obtainer, int port) throws RemoteException;
	ServerListResult list() throws RemoteException;
	ServerStoreResult store(String path, long fileSize) throws RemoteException;
	ServerGetResult get(String path) throws RemoteException;
	/**
	 *@see server.LongcatServer#ok(StorageInterface, String)
	 */
	void ok(StorageInterface storage, String path)throws RemoteException;
	void disconnect(StorageInterface storage) throws RemoteException;
	void delete(String remotePath) throws RemoteException;
}
